Once you've dumped the heap into a binary file, you can use jhat to analyze the binary heap dump file. 将堆转储至一个二进制文件后,您就可以使用jhat分析二进制堆转储文件。
Because a heap dump is such a large file, it is not practical to attempt to examine it by hand. 由于堆存储是一个很大的文件,手动检查是不切实际的。
Running this command tells the JVM to take a "heap dump snapshot" and save it to a file for processing, usually using the jhat utility ( which I introduced in a previous article). 运行该命令通知JVM拍摄一个“堆转储快照”,并将其保存在一个文件中以便处理,通常使用jhat实用工具(我在上一篇文章中介绍过)。
If you pass dumpHeap a filename to dump to in the first(" String") input box, it will take a snapshot of the entire JVM heap and dump it to that file. 如果您在第一个(“字符串”)输入框中向dumpHeap传递一个文件名来转储,它将为整个JVM堆照一个快照,并将其转储到那个文件。
The heap dump report consists of two files, a log-hd file and a log-hdcnm file. heapdump报告包括两个文件,一个log-hd文件和一个log-hdcnm文件。
When the cache gets too large to fit into the JVM heap, dynacache disk offload writes the contents of the cache out to a file on disk. 当缓存大于JVM堆时,dynacache磁盘卸载会将缓存内容写到一个磁盘文件中。
A heap dump is typically a very large file that contains a list of all the objects currently on the JVM heap. 通常,堆转储通常是一个很大的文件,它包含当前JVM堆中所有对象的一个列表。
If you're allocating native resources ( memory on the native heap, file descriptors, or whatever), it can be significantly more difficult to arrange timely collection of these resources. 当你分配本地资源时(本地堆上的内存,文件说明符等),往往很难实时的回收这些资源。
Debugging memory usage or memory leaks is aided by the heap dump feature, which can be used with Rubinius:: VM. dump_heap("/ path/ to/ file"). 调试内存使用或内存泄漏问题是由堆转储特性所支持的,可以使用Rubinius::VM.dumpheap(“/path/to/file”)实现。